﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Faculty
{
    class Group
    {
        public string nameOfGroup;
        List<Student> listOfStudents = new List<Student>();
        static void AddStudentToGroup()
        {
            string choise = "N";
            do
            {
                Console.Clear();
                Console.WriteLine("Добавить ещё студента:");
                Student firstStudent = new Student();
                firstStudent.FillStudentnfo();
                firstStudent.Add(firstStudent);
                Console.WriteLine("Будете еще добавлять? (Y/N)");
                choise = Console.ReadLine().ToUpper();
            }
            while (choise == "Y");
        }

            
            public void ShowCompleteListOfStudents()
        {
            Console.WriteLine("студенты группы {0}:", nameOfGroup);
            foreach (var student in listOfStudents)
            {
                student.PrintStudentInfo();
                Console.WriteLine("Средний бал - {0}", firstStudent.AvarageMark());
            }
        }
    } }